
public class LongestIncreasingSubs {
	public static int[] array={5,3,4,8,6,7};
	public static int[] result = new int[array.length];
	
	public static void main(String[] args){
		System.out.println(compute());
	}
	
	public static int compute(){
		for(int j=0;j<array.length;j++){
			result[j]=1;
			for(int i=0;i<j;i++){
				if(array[i]<array[array.length-1]){
					result[j] = result[j] > result[i]+1?result[j]:result[i]+1;
				}
			}
		}
		return result[array.length-1];
	}
}
